package org.aceor.tennis.common.enums;

/**
 * Created by lxue on 16/5/13.
 */
public enum ErrorCode {
    SYS_ERROR("SYS_ERROR", "系统错误"),
    PARAM_NULL("PARAM_NULL", "参数为空"),
    PARAM_ERROR("PARAM_ERROR", "参数错误"),

    LOGIN_ERROR("LOGIN_ERROR", "登陆失败"),
    REGISTER_ERROR("REGISTER_ERROR", "注册失败"),
    SIGNUP_ERROR("REGISTER_ERROR", "报名失败"), USER_HAS_EXISTED("USER_HAS_EXISTED", "用户已经存在");
    private String errorCode;

    /**
     * 错误信息
     */
    private String errorMessage;

    ErrorCode(String errorCode, String errorMessage) {

        this.errorCode = errorCode;
        this.errorMessage = errorMessage;

    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    @Override
    public String toString() {
        return "errorCode:" + errorCode + ",errorMessage:" + errorMessage;
    }
}
